import 'package:json_annotation/json_annotation.dart';

part 'comment_bean.g.dart';


@JsonSerializable()
class CommentBean extends Object {

  @JsonKey(name: 'allow_notification')
  bool allowNotification;

  @JsonKey(name: 'author')
  String author;

  @JsonKey(name: 'author_logo')
  String authorLogo;

  @JsonKey(name: 'author_url')
  String authorUrl;

  @JsonKey(name: 'children')
  List<CommentBean> children;

  @JsonKey(name: 'content')
  String content;

  @JsonKey(name: 'create_time')
  int createTime;

  @JsonKey(name: 'email')
  String email;

  @JsonKey(name: 'gravatar_md5')
  String gravatarMd5;

  @JsonKey(name: 'id')
  int id;

  @JsonKey(name: 'ip_address')
  String ipAddress;

  @JsonKey(name: 'is_admin')
  bool isAdmin;

  @JsonKey(name: 'parent_id')
  int parentId;

  @JsonKey(name: 'status')
  String status;

  @JsonKey(name: 'user_agent')
  String userAgent;

  @JsonKey(name: 'user_id')
  int userId;

  CommentBean(this.allowNotification,this.author,this.authorUrl,this.children,this.content,this.createTime,this.email,this.gravatarMd5,this.id,this.ipAddress,this.isAdmin,this.parentId,this.status,this.userAgent,this.userId,);

  factory CommentBean.fromJson(Map<String, dynamic> srcJson) => _$CommentBeanFromJson(srcJson);

  Map<String, dynamic> toJson() => _$CommentBeanToJson(this);

}


